<!DOCTYPE html>
<html lang="en" class="js csstransforms3d">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="generator" content="Hugo 0.20.7" />
    <meta name="description" content="">


    <link rel="shortcut icon" href="http://shardingjdbc.io/document/legacy/2.x/en/img/favicon.png" type="image/x-icon" />

    
    <title>Usage Example</title>
    <link href="http://ovfotjrsi.bkt.clouddn.com/docs/css/nucleus.css" rel="stylesheet">
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="http://ovfotjrsi.bkt.clouddn.com/docs/css/theme.css" rel="stylesheet">
    <link href="http://ovfotjrsi.bkt.clouddn.com/docs/css/hugo-theme.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <style type="text/css">:root #header + #content > #left > #rlblock_left
    {display:none !important;}</style>
    <link rel="stylesheet" href="http://cdn.bootcss.com/highlight.js/9.8.0/styles/monokai-sublime.min.css">
<link rel="stylesheet" href="http://ovfotjrsi.bkt.clouddn.com/docs/css/style.css">
  </head>
  <body class="" data-url="/01-start/code-demo/">
    
    <nav id="sidebar">
  <div id="header-wrapper">
    <div id="header">
      <img src="http://ovfotjrsi.bkt.clouddn.com/docs/img/sharding-jdbc.png" />
    </div>
</div>
  <div class="highlightable">
    <ul class="topics">
      
        
        
          
          
            
          
        
          
          
            
          
        
          
          
            
          
        
          
          
            
          
        
        
        
          
        
          
        
          
        
          
        
      
      
      
      

      
      
      
        
          
          
            
          
        
      
      
      

      <li class="dd-item  " data-nav-id="/00-overview/">
        <a href="http://shardingjdbc.io/document/legacy/2.x/en/00-overview/">
          <span>
            
              <b>0. </b>
            
             Overview
            
           </span>
        </a>
        
        <ul>
          
            <li class="dd-item " data-nav-id="/00-overview/intro/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/00-overview/intro/">
                <span>Brief Introduction     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/00-overview/news/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/00-overview/news/">
                <span>News     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/00-overview/contribution/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/00-overview/contribution/">
                <span>Contribute Code     </i></span>
              </a>
            </li>
          
        </ul>
        
      </li>
      
      
      

      
      
      
        
          
          
            
          
        
      
      
      

      <li class="dd-item  parent" data-nav-id="/01-start/">
        <a href="http://shardingjdbc.io/document/legacy/2.x/en/01-start/">
          <span>
            
              <b>1. </b>
            
             Introduction
            
           </span>
        </a>
        
        <ul>
          
            <li class="dd-item " data-nav-id="/01-start/quick-start/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/01-start/quick-start/">
                <span>Quick Start     </i></span>
              </a>
            </li>
          
            <li class="dd-item active" data-nav-id="/01-start/code-demo/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/01-start/code-demo/">
                <span>Usage Example     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/01-start/faq/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/01-start/faq/">
                <span>FAQ     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/01-start/features/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/01-start/features/">
                <span>Feature List     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/01-start/limitations/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/01-start/limitations/">
                <span>Use Limits     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/01-start/sql-supported/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/01-start/sql-supported/">
                <span>The list of available SQL syntax     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/01-start/stress-test/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/01-start/stress-test/">
                <span>The performance-test report     </i></span>
              </a>
            </li>
          
        </ul>
        
      </li>
      
      
      

      
      
      
        
          
          
            
          
        
      
      
      

      <li class="dd-item  " data-nav-id="/02-guide/">
        <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/">
          <span>
            
              <b>2. </b>
            
             User Manual
            
           </span>
        </a>
        
        <ul>
          
            <li class="dd-item " data-nav-id="/02-guide/concepts/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/concepts/">
                <span>Basic Concepts      </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/02-guide/sharding/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/sharding/">
                <span>Sharding     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/02-guide/master-slave/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/master-slave/">
                <span>Read-write splitting     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/02-guide/config_domain/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/config_domain/">
                <span>Domain Model Configuration     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/02-guide/configuration/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/configuration/">
                <span>Configuration     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/02-guide/orchestration/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/orchestration/">
                <span>Orchestration     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/02-guide/hint-sharding-value/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/hint-sharding-value/">
                <span>Mandatory Routing     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/02-guide/key-generator/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/key-generator/">
                <span>Distributed Primary key     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/02-guide/transaction/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/transaction/">
                <span>Transaction Support     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/02-guide/subquery/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/subquery/">
                <span>The Pagination and subquery     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/02-guide/test-framework/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/test-framework/">
                <span>Test Engine     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/02-guide/apm/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/apm/">
                <span>APM     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/02-guide/sharding-jdbc-server/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/02-guide/sharding-jdbc-server/">
                <span>Sharding-JDBC-Server     </i></span>
              </a>
            </li>
          
        </ul>
        
      </li>
      
      
      

      
      
      
        
          
          
            
          
        
      
      
      

      <li class="dd-item  " data-nav-id="/03-design/">
        <a href="http://shardingjdbc.io/document/legacy/2.x/en/03-design/">
          <span>
            
              <b>3. </b>
            
             Design Plan
            
           </span>
        </a>
        
        <ul>
          
            <li class="dd-item " data-nav-id="/03-design/architecture/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/03-design/architecture/">
                <span>Architecture Design     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/03-design/module/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/03-design/module/">
                <span>Module Declaration     </i></span>
              </a>
            </li>
          
            <li class="dd-item " data-nav-id="/03-design/roadmap/">
              <a href="http://shardingjdbc.io/document/legacy/2.x/en/03-design/roadmap/">
                <span>Roadmap     </i></span>
              </a>
            </li>
          
        </ul>
        
      </li>
      
      
    </ul>
    <hr>
     
  </div>
</nav>

        <section id="body">
        <div id="overlay"></div>

        <div class="padding highlightable">

            <div id="top-bar">
              
              <div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb">
                  <span id="sidebar-toggle-span">
                      <a href="#" id="sidebar-toggle" data-sidebar-toggle="">
                        <i class="fa fa-bars"></i>
                      </a>
                  </span>
                
                <span id="toc-menu"><a href=""><i class="fa fa-list-alt"></i></a></span>
                
                
                  
                  
                  
                    
                    
                <a href="http://shardingjdbc.io/document/legacy/2.x/en/01-start/" itemprop="url"><span itemprop="title">Introduction</span></a> <i class="fa fa-angle-right"></i>
                    
                  
                
                <span itemprop="title"> Usage Example</span>
              </div>
              
                  <div class="progress">
    <div class="wrapper">
<nav id="TableOfContents">
<ul>
<li><a href="#notices">Notices:</a></li>
<li><a href="#the-usage-example-in-native-jdbc">The usage example in native JDBC</a>
<ul>
<li><a href="#sharding-jdbc-raw-jdbc-java-example">sharding-jdbc-raw-jdbc-java-example</a>
<ul>
<li><a href="#read-write-splitting">Read-write splitting:</a></li>
<li><a href="#sharding">Sharding:</a></li>
<li><a href="#database-sharding-merely">Database Sharding merely:</a></li>
<li><a href="#table-sharding-merely">Table Sharding merely:</a></li>
<li><a href="#sharding-read-write-splitting">Sharding + Read-write splitting:</a></li>
</ul></li>
</ul></li>
<li><a href="#the-usage-example-in-yaml">The usage example in Yaml</a>
<ul>
<li><a href="#sharding-jdbc-raw-jdbc-yaml-example">sharding-jdbc-raw-jdbc-yaml-example</a>
<ul>
<li><a href="#read-write-splitting-1">Read-write splitting:</a></li>
<li><a href="#sharding-1">Sharding:</a></li>
<li><a href="#database-sharding-merely-1">Database Sharding merely:</a></li>
<li><a href="#table-sharding-merely-1">Table Sharding merely:</a></li>
<li><a href="#sharding-read-write-splitting-1">Sharding + Read-write splitting:</a></li>
</ul></li>
</ul></li>
<li><a href="#the-usage-example-in-spring-based-on-jpa">The usage example in Spring based on JPA</a>
<ul>
<li><a href="#sharding-jdbc-spring-namespace-jpa-example">sharding-jdbc-spring-namespace-jpa-example</a>
<ul>
<li><a href="#read-write-splitting-2">Read-write splitting:</a></li>
<li><a href="#sharding-2">Sharding:</a></li>
<li><a href="#database-sharding-merely-2">Database Sharding merely:</a></li>
<li><a href="#table-sharding-merely-2">Table Sharding merely:</a></li>
<li><a href="#sharding-read-write-splitting-2">Sharding + Read-write splitting:</a></li>
</ul></li>
</ul></li>
<li><a href="#the-usage-example-in-spring-based-on-mybatis">The usage example in Spring based on Mybatis</a>
<ul>
<li><a href="#sharding-jdbc-spring-namespace-mybatis-example">sharding-jdbc-spring-namespace-mybatis-example</a>
<ul>
<li><a href="#read-write-splitting-3">Read-write splitting:</a></li>
<li><a href="#sharding-3">Sharding:</a></li>
<li><a href="#database-sharding-merely-3">Database Sharding merely:</a></li>
<li><a href="#table-sharding-merely-3">Table Sharding merely:</a></li>
<li><a href="#sharding-read-write-splitting-3">Sharding + Read-write splitting:</a></li>
</ul></li>
</ul></li>
<li><a href="#the-usage-example-in-spring-boot-based-on-spring-data-jpa">The usage example in Spring Boot based on Spring Data JPA</a>
<ul>
<li><a href="#sharding-jdbc-spring-boot-data-jpa-example">sharding-jdbc-spring-boot-data-jpa-example</a>
<ul>
<li><a href="#the-entry-class">The entry class</a></li>
<li><a href="#the-configuration-introduction">The configuration introduction</a></li>
</ul></li>
</ul></li>
<li><a href="#the-usage-example-in-spring-boot-based-on-spring-data-mybatis">The usage example in Spring Boot based on Spring Data Mybatis</a>
<ul>
<li><a href="#sharding-jdbc-spring-namespace-mybatis-example-1">sharding-jdbc-spring-namespace-mybatis-example</a>
<ul>
<li><a href="#the-entry-class-1">The entry class</a></li>
<li><a href="#the-configuration-introduction-1">The configuration introduction</a></li>
</ul></li>
</ul></li>
<li><a href="#the-examples-for-the-orchestration-of-the-databases">The examples for the orchestration of the databases</a>
<ul>
<li><a href="#sharding-jdbc-orchestration-java-example">sharding-jdbc-orchestration-java-example</a></li>
<li><a href="#sharding-jdbc-orchestration-yaml-example">sharding-jdbc-orchestration-yaml-example</a></li>
<li><a href="#sharding-jdbc-orchestration-spring-namespace-example">sharding-jdbc-orchestration-spring-namespace-example</a></li>
<li><a href="#sharding-jdbc-orchestration-spring-boot-example">sharding-jdbc-orchestration-spring-boot-example</a></li>
</ul></li>
<li><a href="#the-usage-example-of-b-a-s-e-transaction">The usage example of B.A.S.E transaction</a>
<ul>
<li><a href="#sharding-jdbc-transaction-example">sharding-jdbc-transaction-example</a></li>
</ul></li>
</ul>
</nav>
    </div>
</div>

              

            </div>
            
              <div id="body-inner">
                
                <h1>Usage Example</h1>
                



<p>Please refer to the usage examples of Sharding-JDBC in <a href="https://github.com/shardingjdbc/sharding-jdbc-example">Usage Example</a></p>

<h1 id="notices">Notices:</h1>

<ol>
<li><p>Please run resources/manual_shcema.sql on the test MySQL database to automatically create the database for testing. If PostgreSQL, SQLServer, or Oracle is used, you need to create test database by running your scripts.</p></li>

<li><p>Users need to modify the database URL, driver, username, password, yaml or Spring configuration in the example.</p></li>

<li><p>In the example of Read-write splitting, user needs to build the Master-Slave replication relationship of the databases, otherwise the null value will be obtained when querying in the Slave.</p></li>
</ol>

<h1 id="the-usage-example-in-native-jdbc">The usage example in native JDBC</h1>

<h2 id="sharding-jdbc-raw-jdbc-java-example">sharding-jdbc-raw-jdbc-java-example</h2>

<h3 id="read-write-splitting">Read-write splitting:</h3>

<pre><code class="language-java">io.shardingjdbc.example.jdbc.java.RawJdbcJavaMasterSlaveOnlyMain 
</code></pre>

<h3 id="sharding">Sharding:</h3>

<pre><code class="language-java">io.shardingjdbc.example.jdbc.java.RawJdbcJavaShardingDatabaseAndTableMain
</code></pre>

<h3 id="database-sharding-merely">Database Sharding merely:</h3>

<pre><code class="language-java">io.shardingjdbc.example.jdbc.java.RawJdbcJavaShardingDatabaseOnlyMain
</code></pre>

<h3 id="table-sharding-merely">Table Sharding merely:</h3>

<pre><code class="language-java">io.shardingjdbc.example.jdbc.java.RawJdbcJavaShardingTableOnlyMain
</code></pre>

<h3 id="sharding-read-write-splitting">Sharding + Read-write splitting:</h3>

<pre><code class="language-java">io.shardingjdbc.example.jdbc.java.RawJdbcJavaShardingAndMasterSlaveMain
</code></pre>

<h1 id="the-usage-example-in-yaml">The usage example in Yaml</h1>

<h2 id="sharding-jdbc-raw-jdbc-yaml-example">sharding-jdbc-raw-jdbc-yaml-example</h2>

<h3 id="read-write-splitting-1">Read-write splitting:</h3>

<pre><code class="language-java">io.shardingjdbc.example.jdbc.yaml.RawJdbcYamlMasterSlaveOnlyMain 
</code></pre>

<h3 id="sharding-1">Sharding:</h3>

<pre><code class="language-java">io.shardingjdbc.example.jdbc.yaml.RawJdbcYamlShardingDatabaseAndTableMain
</code></pre>

<h3 id="database-sharding-merely-1">Database Sharding merely:</h3>

<pre><code class="language-java">io.shardingjdbc.example.jdbc.yaml.RawJdbcYamlShardingDatabaseOnlyMain
</code></pre>

<h3 id="table-sharding-merely-1">Table Sharding merely:</h3>

<pre><code class="language-java">io.shardingjdbc.example.jdbc.yaml.RawJdbcYamlShardingTableOnlyMain
</code></pre>

<h3 id="sharding-read-write-splitting-1">Sharding + Read-write splitting:</h3>

<pre><code class="language-java">io.shardingjdbc.example.jdbc.yaml.RawJdbcYamlShardingAndMasterSlaveMain
</code></pre>

<h1 id="the-usage-example-in-spring-based-on-jpa">The usage example in Spring based on JPA</h1>

<h2 id="sharding-jdbc-spring-namespace-jpa-example">sharding-jdbc-spring-namespace-jpa-example</h2>

<h3 id="read-write-splitting-2">Read-write splitting:</h3>

<pre><code class="language-java">io.shardingjdbc.example.spring.namespace.jpa.SpringJpaMasterSlaveOnlyMain 
</code></pre>

<h3 id="sharding-2">Sharding:</h3>

<pre><code class="language-java">io.shardingjdbc.example.spring.namespace.jpa.SpringJpaShardingDatabaseAndTableMain
</code></pre>

<h3 id="database-sharding-merely-2">Database Sharding merely:</h3>

<pre><code class="language-java">io.shardingjdbc.example.spring.namespace.jpa.SpringJpaShardingDatabaseOnlyMain
</code></pre>

<h3 id="table-sharding-merely-2">Table Sharding merely:</h3>

<pre><code class="language-java">io.shardingjdbc.example.spring.namespace.jpa.SpringJpaShardingTableMain
</code></pre>

<h3 id="sharding-read-write-splitting-2">Sharding + Read-write splitting:</h3>

<pre><code class="language-java">io.shardingjdbc.example.spring.namespace.jpa.SpringJpaShardingDatabaseAndMasterSlaveMain
</code></pre>

<h1 id="the-usage-example-in-spring-based-on-mybatis">The usage example in Spring based on Mybatis</h1>

<h2 id="sharding-jdbc-spring-namespace-mybatis-example">sharding-jdbc-spring-namespace-mybatis-example</h2>

<h3 id="read-write-splitting-3">Read-write splitting:</h3>

<pre><code class="language-java">io.shardingjdbc.example.spring.namespace.jpa.SpringMybatisMasterSlaveOnlyMain 
</code></pre>

<h3 id="sharding-3">Sharding:</h3>

<pre><code class="language-java">io.shardingjdbc.example.spring.namespace.jpa.SpringMybatisShardingDatabaseAndTableMain
</code></pre>

<h3 id="database-sharding-merely-3">Database Sharding merely:</h3>

<pre><code class="language-java">io.shardingjdbc.example.spring.namespace.jpa.SpringMybatisShardingDatabaseOnlyMain
</code></pre>

<h3 id="table-sharding-merely-3">Table Sharding merely:</h3>

<pre><code class="language-java">io.shardingjdbc.example.spring.namespace.jpa.SpringMybatisShardingTableMain
</code></pre>

<h3 id="sharding-read-write-splitting-3">Sharding + Read-write splitting:</h3>

<pre><code class="language-java">io.shardingjdbc.example.spring.namespace.jpa.SpringMybatisShardingDatabaseAndMasterSlaveMain
</code></pre>

<h1 id="the-usage-example-in-spring-boot-based-on-spring-data-jpa">The usage example in Spring Boot based on Spring Data JPA</h1>

<h2 id="sharding-jdbc-spring-boot-data-jpa-example">sharding-jdbc-spring-boot-data-jpa-example</h2>

<h3 id="the-entry-class">The entry class</h3>

<pre><code class="language-java">io.shardingjdbc.example.spring.boot.starter.jpa.SpringBootDataJpaMain
</code></pre>

<h3 id="the-configuration-introduction">The configuration introduction</h3>

<p>To switch example configuration by modifying spring.profiles.active in resources/applicaiton.properties file.</p>

<pre><code class="language-xml">spring.profiles.active=sharding
#spring.profiles.active=sharding-db
#spring.profiles.active=sharding-tbl
#spring.profiles.active=masterslave
#spring.profiles.active=sharding-masterslave
</code></pre>

<h1 id="the-usage-example-in-spring-boot-based-on-spring-data-mybatis">The usage example in Spring Boot based on Spring Data Mybatis</h1>

<h2 id="sharding-jdbc-spring-namespace-mybatis-example-1">sharding-jdbc-spring-namespace-mybatis-example</h2>

<h3 id="the-entry-class-1">The entry class</h3>

<pre><code class="language-java">io.shardingjdbc.example.spring.boot.jpa.SpringBootDataMybatisMain
</code></pre>

<h3 id="the-configuration-introduction-1">The configuration introduction</h3>

<p>To switch example configuration by modifying spring.profiles.active in resources/applicaiton.properties file.</p>

<pre><code class="language-xml">spring.profiles.active=sharding
#spring.profiles.active=sharding-db
#spring.profiles.active=sharding-tbl
#spring.profiles.active=masterslave
#spring.profiles.active=sharding-masterslave
</code></pre>

<h1 id="the-examples-for-the-orchestration-of-the-databases">The examples for the orchestration of the databases</h1>

<p>To set up Zookeeper environment, whose address in this example is localhost:2181.</p>

<h2 id="sharding-jdbc-orchestration-java-example">sharding-jdbc-orchestration-java-example</h2>

<ol>
<li>run</li>
</ol>

<pre><code class="language-java">io.shardingjdbc.example.orchestration.OrchestrationShardingMain
</code></pre>

<h2 id="sharding-jdbc-orchestration-yaml-example">sharding-jdbc-orchestration-yaml-example</h2>

<ol>
<li>run</li>
</ol>

<pre><code class="language-java">io.shardingjdbc.example.orchestration.yaml.OrchestrationYamlShardingMain
</code></pre>

<h2 id="sharding-jdbc-orchestration-spring-namespace-example">sharding-jdbc-orchestration-spring-namespace-example</h2>

<ol>
<li>run</li>
</ol>

<pre><code class="language-java">io.shardingjdbc.example.orchestration.spring.namespace.OrchestrationSpringMybatisShardingShardingMain
</code></pre>

<h2 id="sharding-jdbc-orchestration-spring-boot-example">sharding-jdbc-orchestration-spring-boot-example</h2>

<ol>
<li>run</li>
</ol>

<pre><code class="language-java">io.shardingjdbc.example.orchestration.spring.boot.OrchestrationSpringBootDataJpaMain
</code></pre>

<h1 id="the-usage-example-of-b-a-s-e-transaction">The usage example of B.A.S.E transaction</h1>

<h2 id="sharding-jdbc-transaction-example">sharding-jdbc-transaction-example</h2>

<pre><code class="language-java">io.shardingjdbc.example.transaction.TransactionMain
</code></pre>


      
      
      </div>
    </div>

    

    <div id="navigation">
        
        <a class="nav nav-prev" href="http://shardingjdbc.io/document/legacy/2.x/en/01-start/quick-start/"> <i class="fa fa-chevron-left"></i></a>
        <a class="nav nav-next" href="http://shardingjdbc.io/document/legacy/2.x/en/01-start/faq/" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
    </div>

    </section>
    <div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
      <div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
    </div>
    <script src="http://ovfotjrsi.bkt.clouddn.com/docs/js/clipboard.min.js"></script>
    <script src="http://ovfotjrsi.bkt.clouddn.com/docs/js/perfect-scrollbar.min.js"></script>
    <script src="http://ovfotjrsi.bkt.clouddn.com/docs/js/perfect-scrollbar.jquery.min.js"></script>
    <script src="http://ovfotjrsi.bkt.clouddn.com/docs/js/jquery.sticky-kit.min.js"></script>
    <script src="http://ovfotjrsi.bkt.clouddn.com/docs/js/featherlight.min.js"></script>
    <script src="http://ovfotjrsi.bkt.clouddn.com/docs/js/html5shiv-printshiv.min.js"></script>
    <script src="http://ovfotjrsi.bkt.clouddn.com/docs/js/highlight.pack.js"></script>
    <script>hljs.initHighlightingOnLoad();</script>
    <script src="http://ovfotjrsi.bkt.clouddn.com/docs/js/learn.js"></script>
    <script src="http://ovfotjrsi.bkt.clouddn.com/docs/js/hugo-learn.js"></script>
    <script src="http://cdn.bootcss.com/highlight.js/9.8.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

  </body>
</html>

